package com.learn.egweibo666.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserRegParam {
    //用户名只能是字母
    @Pattern(regexp = "^[a-zA-Z]$",message = "用户名只能是字母")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @Pattern(regexp = "^[a-zA-Z0-9_-]{6,16}$",message = "密码只能是数字、字母、下划线，长度为6-16位")
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @NotBlank(message = "昵称不能为空")
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;
}
